C (228/301)

From:Bob Lanham
Date:18 Aug 99 at 12:18:37
Subject:more ilbm saving

From: Bob Lanham <bobl@jaxproductions.com>

I cleaned up the compiler errors by linking to some more modules. Now
I'm actually saving a file, but it's not a viewable ILBM. If anybody
knows what's wrong with the function below, please let me know! Thanks
again, Bob L.

/*-----------------------------------------------------------------*/

void SavePic(void)
{
LONG ilbmprops[]={ID_ILBM,ID_BMHD,ID_ILBM,ID_CMAP,TAG_DONE};
LONG ilbmcollects[]={ID_ILBM,ID_CRNG,TAG_DONE};
LONG ilbmstops[]={ID_ILBM,ID_BODY,TAG_DONE};

struct ILBMInfo *ilbm=NULL;
ilbm=AllocVec(sizeof(struct ILBMInfo),MEMF_CLEAR);
ilbm->ParseInfo.propchks=ilbmprops;
ilbm->ParseInfo.collectchks=ilbmcollects;
ilbm->ParseInfo.stopchks=ilbmstops;
ilbm->ParseInfo.iff=AllocIFF(); // iff handle

ilbm->ParseInfo.copiedchunks=

copychunks(ilbm->ParseInfo.iff,ilbmprops,ilbmcollects,MEMF_PUBLIC);

saveilbm(ilbm,window1->RPort->BitMap, // our bitmap
screenmode->sm_DisplayID, // modeid
window1->Width,window1->Height,
window1->Width,window1->Height,
screen1->ViewPort.ColorMap, // colortable
screen1->ViewPort.ColorMap->Count, // number of colors
4,mskNone,0,
ilbm->ParseInfo.copiedchunks,
NULL, // NULL 2nd chunklist ..
OK?
"ram:savetest.ilbm"); // filename

FreeIFF(ilbm->ParseInfo.iff);
FreeVec(ilbm);
}

/*----------------------------------------------------------------------------*/